﻿using GalaSoft.MvvmLight.Ioc;
using Microsoft.Practices.ServiceLocation;

namespace Looptribe.Moodlin8.ViewModel
{
    public class ViewModelLocator
    {
        static ViewModelLocator()
        {
            SimpleIoc.Default.Register<LoginViewModel>();
            SimpleIoc.Default.Register<HubViewModel>();
            SimpleIoc.Default.Register<SearchResultsViewModel>();
            SimpleIoc.Default.Register<FileOpenPickerViewModel>();
            SimpleIoc.Default.Register<CoursesViewModel>();
            SimpleIoc.Default.Register<CourseViewModel>();
            SimpleIoc.Default.Register<CourseContentViewModel>();
            SimpleIoc.Default.Register<CourseUsersViewModel>();
            SimpleIoc.Default.Register<CourseEventsViewModel>();
            SimpleIoc.Default.Register<NextAssignmentsViewModel>();
            SimpleIoc.Default.Register<CorrectedAssignmentsViewModel>();
            SimpleIoc.Default.Register<UploadsViewModel>();
            SimpleIoc.Default.Register<TeacherViewModel>();
            SimpleIoc.Default.Register<AssignmentViewModel>();
            SimpleIoc.Default.Register<DayEventsViewModel>();
            SimpleIoc.Default.Register<UserMessagesViewModel>();
        }

        public LoginViewModel Login { get { return ServiceLocator.Current.GetInstance<LoginViewModel>(); } }

        public HubViewModel Hub { get { return ServiceLocator.Current.GetInstance<HubViewModel>(); } }

        public SearchResultsViewModel SearchResults { get { return ServiceLocator.Current.GetInstance<SearchResultsViewModel>(); } }

        public FileOpenPickerViewModel FileOpenPicker { get { return ServiceLocator.Current.GetInstance<FileOpenPickerViewModel>(); } }

        public CoursesViewModel Courses { get { return ServiceLocator.Current.GetInstance<CoursesViewModel>(); } }

        public CourseViewModel Course { get { return ServiceLocator.Current.GetInstance<CourseViewModel>(); } }

        public CourseContentViewModel CourseContent { get { return ServiceLocator.Current.GetInstance<CourseContentViewModel>(); } }

        public CourseUsersViewModel CourseUsers { get { return ServiceLocator.Current.GetInstance<CourseUsersViewModel>(); } }

        public CourseEventsViewModel CourseEvents { get { return ServiceLocator.Current.GetInstance<CourseEventsViewModel>(); } }

        public NextAssignmentsViewModel NextAssignments { get { return ServiceLocator.Current.GetInstance<NextAssignmentsViewModel>(); } }

        public CorrectedAssignmentsViewModel CorrectedAssignments { get { return ServiceLocator.Current.GetInstance<CorrectedAssignmentsViewModel>(); } }

        public UploadsViewModel Uploads { get { return ServiceLocator.Current.GetInstance<UploadsViewModel>(); } }

        public TeacherViewModel Teacher { get { return ServiceLocator.Current.GetInstance<TeacherViewModel>(); } }

        public AssignmentViewModel Assignment { get { return ServiceLocator.Current.GetInstance<AssignmentViewModel>(); } }

        public DayEventsViewModel DayEvents { get { return ServiceLocator.Current.GetInstance<DayEventsViewModel>(); } }

        public UserMessagesViewModel UserMessages { get { return ServiceLocator.Current.GetInstance<UserMessagesViewModel>(); } }
    }
}
